<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="js/vue.js"></script>
    <title>Document</title>
    <style>
        .aa{
            background: black;
        }
        .bb{
            border: 10px solid green;
        }
        .cc{
            width: 100px;
            height: 100px;
        }
        .dd{
            background: pink;
            width: 300px;
            height: 300px;
        }
    </style>
</head>
<body>
    <div id="app" >
        <div :style="styleArr"></div>
        <button @click="addStyle">添加style</button>
    </div>
    <script>
        var vm = new Vue({
            el:"#app",
            data:{
                styleArr:[{
                    background:"black"
                }]
            },
            methods:{
                addStyle(){
                    this.styleArr.push({
                        height:"200px"
                    })
                }
            }
        });
    </script>
</body>
</html>